package com.candy.oop1;

import com.candy.oop.Teacher;

public class Student {
//共性的特征（属性）
//   封装：1、将属性私有化，提供公有的getter和setter方法
    private int stuNo;
    private String stuName;
    private boolean stuSex;

    public static String schoolName="德州学院";
//封装2：将构造函数私有化，提供公有的访问方法（静态方法）
//     private Student() {
//    }
    public Student() {
    }

//    快捷键alt+insert可以自动生成属性对应的getter和setter方法
    public int getStuNo() {
        return stuNo;
    }

    public void setStuNo(int stuNo) {
        this.stuNo = stuNo;
    }

    public String getStuName() {
        return stuName;
    }

    public void setStuName(String stuName) {
        this.stuName = stuName;
    }

    public boolean isStuSex() {
        return stuSex;
    }

    public void setStuSex(boolean stuSex) {
        this.stuSex = stuSex;
    }

    public static void getSchoolName(){
        System.out.println("学校："+schoolName);
    }

}
